#include<iostream>
using namespace std;
const int N = 1e3 + 10;
int arr[N];
long long sum[N];
void test()
{
	for (int i = 1; i <=N; i++)
	{
		arr[i] = i * i * i;
		sum[i] += sum[i - 1] + arr[i];
	}
}
int main()
{
	test();
	int t;
	cin >> t;
	while (t--)
	{
		long long x;
		cin >> x;
		for (int i = 1; i <= N; i++)
		{
			if (x <= sum[i]) {
				cout << i << endl;
				break;
			}
		}
	}
	return 0;
}